﻿using System;

namespace RayDen.Library.Core
{
    public class JitteredRandom : IRandomProvider
    {
        private Random rnd;

        public JitteredRandom()
        {
            rnd = new Random();
        }

        public void Reinitialise(int seed)
        {
            rnd = new Random(seed);
        }

        public float NextFloat()
        {
            return (float) rnd.NextDouble();
        }

        public double NextDouble()
        {
            return rnd.NextDouble();
        }
    }
}